<!DOCTYPE html>
<html>
<head>
<title>List Updates</title>
<meta name="viewport" 
      content="width=device-width, initial-scale=1">	
<link rel="stylesheet" 
      href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<script type="text/javascript" 
        src="http://code.jquery.com/jquery-2.1.3.min.js">
</script>
<script type="text/javascript" 
        src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js">
</script>
</head>

<body>

<div data-role="page" id="third">

	<div data-role="header">
		<h1>List Updates</h1>
	</div>
	
	<div role="main" class="ui-content">

		<ul id="theList" data-role="listview" data-inset="true">
			<li>Initial</li>
			<li>Item</li>
		</ul>
		
		<form>
		<div data-role="fieldcontain">
		    <label for="additem">New Item</label>
		    <input type="text" name="additem" id="additem" value=""  />
		</div>	
		<input type="button" id="testBtn" value="Add It">
		</form>
	</div>

</div>

<script>
$("#testBtn").click(function() {
	var itemToAdd = $.trim($("#additem").val());
	if(itemToAdd == "") return;
	$("#theList").append("<li>"+itemToAdd+"</li>");
	$("#theList").listview("refresh");
});
</script>

</body>
</html>
